:root {
    color-scheme: dark;
}


html {
    scroll-behavior: smooth;
}

/* Subtle animated background (minimal + modern) */
.bg-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px, 24px 24px;
    background-position: 0 0, 0 0;
}

.noise {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    opacity: 0.08;
    pointer-events: none;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms ease, transform 700ms ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .floaty {
        animation: none !important;
    }
}

/* Tiny floating animation for hero */
.floaty {
    animation: floaty 4.2s ease-in-out infinite;
}

@keyframes floaty {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.7);
    outline-offset: 3px;
    border-radius: 10px;
}

.modal-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, 0.55) rgba(255, 255, 255, 0.08);
}

.modal-scroll::-webkit-scrollbar {
    width: 10px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(129, 140, 248, 0.55);
    border-radius: 999px;
}

.skills-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.skills-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}
